/**
 * Created by lenovo on 2017/3/19.
 */
var app = angular.module("purchase", [ "ngCookies", "constApp" ]);
app.controller("purchaseContraller", function($scope, $http, $cookieStore,
                                           $templateCache,$const) {
    $scope.search=function(){
    }

    $scope.getList=function(){
    	var purchase={};
    	purchase["number"]="185121251";
    	purchase["supplier"]="张三";
        purchase["address"]="辽宁";
        purchase["contacts"]="李四";
        purchase["information"]="13504292795";
        var data=[];
        data.push(purchase);
        data.push(purchase);
        data.push(purchase);
        data.push(purchase);
        data.push(purchase);
        $scope.pch={};
       /* $.each(function(data,index){
            if(index%2==0){
                data.cls="gradeX";
            }else{
                data.cls="gradeC";
            }
        })*/
        $scope.purchases=data;
    }
    $scope.getList();

})

function deail(id){
	$("#purchase").load("puchase_deail.html")
}

function merge(){
	$("#purchase").load("puchase_merge.html")
}